set -euxo pipefail

mv dir1/file1 dir1/file3
ln -sf dir2/file2 link1
ln -sf dir1/file3 link3
